3.3.72 \(\int (f+g x)^3 (A+B \log (\frac {e (a+b x)^2}{(c+d x)^2}))^2 \, dx\) [272]

Optimal. Leaf size=869 \[ \frac {2 B^2 (b c-a d)^3 g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-3 b c g-a d g) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 (c+d x)^2}{3 b^2 d^4}-\frac {B (b c-a d) g \left (a^2 d^2 g^2-2 a b d g (2 d f-c g)+b^2 \left (6 d^2 f^2-8 c d f g+3 c^2 g^2\right )\right ) (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-3 b c g-a d g) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^4}-\frac {B (b c-a d) g^3 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d^4}-\frac {(b f-a g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {B (b c-a d) (2 b d f-b c g-a d g) \left (2 a b d^2 f g-a^2 d^2 g^2-b^2 \left (2 d^2 f^2-2 c d f g+c^2 g^2\right )\right ) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{b^4 d^4}+\frac {2 B^2 (b c-a d)^4 g^3 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^4 d^4}+\frac {B^2 (b c-a d)^3 g^2 (4 b d f-3 b c g-a d g) \log \left (\frac {a+b x}{c+d x}\right )}{b^4 d^4}+\frac {2 B^2 (b c-a d)^4 g^3 \log (c+d x)}{3 b^4 d^4}+\frac {B^2 (b c-a d)^3 g^2 (4 b d f-3 b c g-a d g) \log (c+d x)}{b^4 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-2 a b d g (2 d f-c g)+b^2 \left (6 d^2 f^2-8 c d f g+3 c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (b c-a d) (2 b d f-b c g-a d g) \left (2 a b d^2 f g-a^2 d^2 g^2-b^2 \left (2 d^2 f^2-2 c d f g+c^2 g^2\right )\right ) \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b^4 d^4} \]

[Out]

2/3*B^2*(-a*d+b*c)^3*g^3*x/b^3/d^3+B^2*(-a*d+b*c)^2*g^2*(-a*d*g-3*b*c*g+4*b*d*f)*x/b^3/d^3+1/3*B^2*(-a*d+b*c)^
2*g^3*(d*x+c)^2/b^2/d^4-B*(-a*d+b*c)*g*(a^2*d^2*g^2-2*a*b*d*g*(-c*g+2*d*f)+b^2*(3*c^2*g^2-8*c*d*f*g+6*d^2*f^2)
)*(b*x+a)*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))/b^4/d^3-1/2*B*(-a*d+b*c)*g^2*(-a*d*g-3*b*c*g+4*b*d*f)*(d*x+c)^2*(A+B
*ln(e*(b*x+a)^2/(d*x+c)^2))/b^2/d^4-1/3*B*(-a*d+b*c)*g^3*(d*x+c)^3*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))/b/d^4-1/4*(
-a*g+b*f)^4*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/b^4/g+1/4*(g*x+f)^4*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/g-B*(-a*d+
b*c)*(-a*d*g-b*c*g+2*b*d*f)*(2*a*b*d^2*f*g-a^2*d^2*g^2-b^2*(c^2*g^2-2*c*d*f*g+2*d^2*f^2))*(A+B*ln(e*(b*x+a)^2/
(d*x+c)^2))*ln((-a*d+b*c)/b/(d*x+c))/b^4/d^4+2/3*B^2*(-a*d+b*c)^4*g^3*ln((b*x+a)/(d*x+c))/b^4/d^4+B^2*(-a*d+b*
c)^3*g^2*(-a*d*g-3*b*c*g+4*b*d*f)*ln((b*x+a)/(d*x+c))/b^4/d^4+2/3*B^2*(-a*d+b*c)^4*g^3*ln(d*x+c)/b^4/d^4+B^2*(
-a*d+b*c)^3*g^2*(-a*d*g-3*b*c*g+4*b*d*f)*ln(d*x+c)/b^4/d^4+2*B^2*(-a*d+b*c)^2*g*(a^2*d^2*g^2-2*a*b*d*g*(-c*g+2
*d*f)+b^2*(3*c^2*g^2-8*c*d*f*g+6*d^2*f^2))*ln(d*x+c)/b^4/d^4-2*B^2*(-a*d+b*c)*(-a*d*g-b*c*g+2*b*d*f)*(2*a*b*d^
2*f*g-a^2*d^2*g^2-b^2*(c^2*g^2-2*c*d*f*g+2*d^2*f^2))*polylog(2,d*(b*x+a)/b/(d*x+c))/b^4/d^4

________________________________________________________________________________________

Rubi [A]
time = 1.10, antiderivative size = 869, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 10, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.323, Rules used = {2554, 2398, 2404, 2338, 2356, 46, 2351, 31, 2354, 2438} \begin {gather*} \frac {2 B^2 g^3 \log \left (\frac {a+b x}{c+d x}\right ) (b c-a d)^4}{3 b^4 d^4}+\frac {2 B^2 g^3 \log (c+d x) (b c-a d)^4}{3 b^4 d^4}+\frac {2 B^2 g^3 x (b c-a d)^3}{3 b^3 d^3}+\frac {B^2 g^2 (4 b d f-3 b c g-a d g) \log \left (\frac {a+b x}{c+d x}\right ) (b c-a d)^3}{b^4 d^4}+\frac {B^2 g^2 (4 b d f-3 b c g-a d g) \log (c+d x) (b c-a d)^3}{b^4 d^4}+\frac {B^2 g^3 (c+d x)^2 (b c-a d)^2}{3 b^2 d^4}+\frac {B^2 g^2 (4 b d f-3 b c g-a d g) x (b c-a d)^2}{b^3 d^3}+\frac {2 B^2 g \left (\left (6 d^2 f^2-8 c d g f+3 c^2 g^2\right ) b^2-2 a d g (2 d f-c g) b+a^2 d^2 g^2\right ) \log (c+d x) (b c-a d)^2}{b^4 d^4}-\frac {B g^3 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) (b c-a d)}{3 b d^4}-\frac {B g^2 (4 b d f-3 b c g-a d g) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) (b c-a d)}{2 b^2 d^4}-\frac {B g \left (\left (6 d^2 f^2-8 c d g f+3 c^2 g^2\right ) b^2-2 a d g (2 d f-c g) b+a^2 d^2 g^2\right ) (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) (b c-a d)}{b^4 d^3}-\frac {B (2 b d f-b c g-a d g) \left (-\left (\left (2 d^2 f^2-2 c d g f+c^2 g^2\right ) b^2\right )+2 a d^2 f g b-a^2 d^2 g^2\right ) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right ) (b c-a d)}{b^4 d^4}-\frac {2 B^2 (2 b d f-b c g-a d g) \left (-\left (\left (2 d^2 f^2-2 c d g f+c^2 g^2\right ) b^2\right )+2 a d^2 f g b-a^2 d^2 g^2\right ) \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) (b c-a d)}{b^4 d^4}-\frac {(b f-a g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f + g*x)^3*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2,x]

[Out]

(2*B^2*(b*c - a*d)^3*g^3*x)/(3*b^3*d^3) + (B^2*(b*c - a*d)^2*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*x)/(b^3*d^3) + (B
^2*(b*c - a*d)^2*g^3*(c + d*x)^2)/(3*b^2*d^4) - (B*(b*c - a*d)*g*(a^2*d^2*g^2 - 2*a*b*d*g*(2*d*f - c*g) + b^2*
(6*d^2*f^2 - 8*c*d*f*g + 3*c^2*g^2))*(a + b*x)*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2]))/(b^4*d^3) - (B*(b*c -
 a*d)*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*(c + d*x)^2*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2]))/(2*b^2*d^4) - (B*(
b*c - a*d)*g^3*(c + d*x)^3*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2]))/(3*b*d^4) - ((b*f - a*g)^4*(A + B*Log[(e*
(a + b*x)^2)/(c + d*x)^2])^2)/(4*b^4*g) + ((f + g*x)^4*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2)/(4*g) - (B*
(b*c - a*d)*(2*b*d*f - b*c*g - a*d*g)*(2*a*b*d^2*f*g - a^2*d^2*g^2 - b^2*(2*d^2*f^2 - 2*c*d*f*g + c^2*g^2))*(A
 + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])*Log[(b*c - a*d)/(b*(c + d*x))])/(b^4*d^4) + (2*B^2*(b*c - a*d)^4*g^3*Lo
g[(a + b*x)/(c + d*x)])/(3*b^4*d^4) + (B^2*(b*c - a*d)^3*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*Log[(a + b*x)/(c + d*
x)])/(b^4*d^4) + (2*B^2*(b*c - a*d)^4*g^3*Log[c + d*x])/(3*b^4*d^4) + (B^2*(b*c - a*d)^3*g^2*(4*b*d*f - 3*b*c*
g - a*d*g)*Log[c + d*x])/(b^4*d^4) + (2*B^2*(b*c - a*d)^2*g*(a^2*d^2*g^2 - 2*a*b*d*g*(2*d*f - c*g) + b^2*(6*d^
2*f^2 - 8*c*d*f*g + 3*c^2*g^2))*Log[c + d*x])/(b^4*d^4) - (2*B^2*(b*c - a*d)*(2*b*d*f - b*c*g - a*d*g)*(2*a*b*
d^2*f*g - a^2*d^2*g^2 - b^2*(2*d^2*f^2 - 2*c*d*f*g + c^2*g^2))*PolyLog[2, (d*(a + b*x))/(b*(c + d*x))])/(b^4*d
^4)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[x*(d + e*x^r)^(q +
 1)*((a + b*Log[c*x^n])/d), x] - Dist[b*(n/d), Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2356

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)
*((a + b*Log[c*x^n])^p/(e*(q + 1))), x] - Dist[b*n*(p/(e*(q + 1))), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2398

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_)*((f_) + (g_.)*(x_))^(m_.), x_Symbol]
:> Simp[(f + g*x)^(m + 1)*(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/((q + 1)*(e*f - d*g))), x] - Dist[b*n*(p/((q
 + 1)*(e*f - d*g))), Int[(f + g*x)^(m + 1)*(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{
a, b, c, d, e, f, g, m, n, q}, x] && NeQ[e*f - d*g, 0] && EqQ[m + q + 2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2554

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_)
)^(m_.), x_Symbol] :> Dist[b*c - a*d, Subst[Int[(b*f - a*g - (d*f - c*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^
(m + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && EqQ[n + mn, 0] && IGt
Q[n, 0] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int (f+g x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2 \, dx &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {B \int \frac {2 (b c-a d) (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{(a+b x) (c+d x)} \, dx}{2 g}\\ &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {(B (b c-a d)) \int \frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{(a+b x) (c+d x)} \, dx}{g}\\ &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {(B (b c-a d)) \int \left (\frac {g^2 \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^3 d^3}+\frac {g^3 (4 b d f-b c g-a d g) x \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^2 d^2}+\frac {g^4 x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b d}+\frac {(b f-a g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^3 (b c-a d) (a+b x)}+\frac {(d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{d^3 (-b c+a d) (c+d x)}\right ) \, dx}{g}\\ &=\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}-\frac {\left (B (b c-a d) g^3\right ) \int x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx}{b d}-\frac {\left (B (b f-a g)^4\right ) \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{a+b x} \, dx}{b^3 g}+\frac {\left (B (d f-c g)^4\right ) \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{c+d x} \, dx}{d^3 g}-\frac {\left (B (b c-a d) g^2 (4 b d f-b c g-a d g)\right ) \int x \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx}{b^2 d^2}-\frac {\left (B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right )\right ) \int \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx}{b^3 d^3}\\ &=-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (B^2 (b c-a d) g^3\right ) \int \frac {2 (b c-a d) x^3}{(a+b x) (c+d x)} \, dx}{3 b d}+\frac {\left (B^2 (b f-a g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (a+b x)}{e (a+b x)^2} \, dx}{b^4 g}-\frac {\left (B^2 (d f-c g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (c+d x)}{e (a+b x)^2} \, dx}{d^4 g}+\frac {\left (B^2 (b c-a d) g^2 (4 b d f-b c g-a d g)\right ) \int \frac {2 (b c-a d) x^2}{(a+b x) (c+d x)} \, dx}{2 b^2 d^2}-\frac {\left (B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right )\right ) \int \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right ) \, dx}{b^3 d^3}\\ &=-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (2 B^2 (b c-a d)^2 g^3\right ) \int \frac {x^3}{(a+b x) (c+d x)} \, dx}{3 b d}+\frac {\left (B^2 (b f-a g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (a+b x)}{(a+b x)^2} \, dx}{b^4 e g}-\frac {\left (B^2 (d f-c g)^4\right ) \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (c+d x)}{(a+b x)^2} \, dx}{d^4 e g}+\frac {\left (B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g)\right ) \int \frac {x^2}{(a+b x) (c+d x)} \, dx}{b^2 d^2}+\frac {\left (2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right )\right ) \int \frac {1}{c+d x} \, dx}{b^4 d^3}\\ &=-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (2 B^2 (b c-a d)^2 g^3\right ) \int \left (\frac {-b c-a d}{b^2 d^2}+\frac {x}{b d}-\frac {a^3}{b^2 (b c-a d) (a+b x)}-\frac {c^3}{d^2 (-b c+a d) (c+d x)}\right ) \, dx}{3 b d}+\frac {\left (B^2 (b f-a g)^4\right ) \int \left (\frac {2 b e \log (a+b x)}{a+b x}-\frac {2 d e \log (a+b x)}{c+d x}\right ) \, dx}{b^4 e g}-\frac {\left (B^2 (d f-c g)^4\right ) \int \left (\frac {2 b e \log (c+d x)}{a+b x}-\frac {2 d e \log (c+d x)}{c+d x}\right ) \, dx}{d^4 e g}+\frac {\left (B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g)\right ) \int \left (\frac {1}{b d}+\frac {a^2}{b (b c-a d) (a+b x)}+\frac {c^2}{d (-b c+a d) (c+d x)}\right ) \, dx}{b^2 d^2}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{b^3 g}-\frac {\left (2 B^2 d (b f-a g)^4\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{b^4 g}-\frac {\left (2 b B^2 (d f-c g)^4\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{d^4 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \int \frac {\log (c+d x)}{c+d x} \, dx}{d^3 g}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (d f-c g)^4 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d^4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}-\frac {2 B^2 (b f-a g)^4 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{b^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{b^3 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{d^4 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{d^3 g}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}+\frac {B^2 (b f-a g)^4 \log ^2(a+b x)}{b^4 g}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (d f-c g)^4 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d^4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {B^2 (d f-c g)^4 \log ^2(c+d x)}{d^4 g}-\frac {2 B^2 (b f-a g)^4 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^4 g}+\frac {\left (2 B^2 (b f-a g)^4\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b^4 g}+\frac {\left (2 B^2 (d f-c g)^4\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{d^4 g}\\ &=-\frac {2 B^2 (b c-a d)^2 (b c+a d) g^3 x}{3 b^3 d^3}+\frac {B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) x}{b^3 d^3}-\frac {A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x}{b^3 d^3}+\frac {B^2 (b c-a d)^2 g^3 x^2}{3 b^2 d^2}-\frac {2 a^3 B^2 (b c-a d) g^3 \log (a+b x)}{3 b^4 d}+\frac {a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (a+b x)}{b^4 d^2}+\frac {B^2 (b f-a g)^4 \log ^2(a+b x)}{b^4 g}-\frac {B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b^4 d^3}-\frac {B (b c-a d) g^2 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{2 b^2 d^2}-\frac {B (b c-a d) g^3 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{3 b d}-\frac {B (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{b^4 g}+\frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{4 g}+\frac {2 B^2 c^3 (b c-a d) g^3 \log (c+d x)}{3 b d^4}-\frac {B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) \log (c+d x)}{b^2 d^4}+\frac {2 B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)}{b^4 d^4}-\frac {2 B^2 (d f-c g)^4 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{d^4 g}+\frac {B (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)}{d^4 g}+\frac {B^2 (d f-c g)^4 \log ^2(c+d x)}{d^4 g}-\frac {2 B^2 (b f-a g)^4 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^4 g}-\frac {2 B^2 (b f-a g)^4 \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{b^4 g}-\frac {2 B^2 (d f-c g)^4 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{d^4 g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.63, size = 746, normalized size = 0.86 \begin {gather*} \frac {(f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2-\frac {2 B \left (6 A b d (b c-a d) g^2 \left (a^2 d^2 g^2+a b d g (-4 d f+c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) x+6 B d (b c-a d) g^2 \left (a^2 d^2 g^2+a b d g (-4 d f+c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) (a+b x) \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+3 b^2 d^2 (b c-a d) g^3 (4 b d f-b c g-a d g) x^2 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )+2 b^3 d^3 (b c-a d) g^4 x^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )+6 d^4 (b f-a g)^4 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )-12 B (b c-a d)^2 g^2 \left (a^2 d^2 g^2+a b d g (-4 d f+c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \log (c+d x)-6 b^4 (d f-c g)^4 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)+2 B (b c-a d) g^4 \left (b d (b c-a d) x (2 b c+2 a d-b d x)+2 a^3 d^3 \log (a+b x)-2 b^3 c^3 \log (c+d x)\right )-6 B (b c-a d) g^3 (-4 b d f+b c g+a d g) \left (-a^2 d^2 \log (a+b x)+b \left (d (-b c+a d) x+b c^2 \log (c+d x)\right )\right )-6 B d^4 (b f-a g)^4 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )\right )+6 b^4 B (d f-c g)^4 \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{3 b^4 d^4}}{4 g} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)^3*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2,x]

[Out]

((f + g*x)^4*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2 - (2*B*(6*A*b*d*(b*c - a*d)*g^2*(a^2*d^2*g^2 + a*b*d*g
*(-4*d*f + c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*x + 6*B*d*(b*c - a*d)*g^2*(a^2*d^2*g^2 + a*b*d*g*(-4*
d*f + c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*(a + b*x)*Log[(e*(a + b*x)^2)/(c + d*x)^2] + 3*b^2*d^2*(b*
c - a*d)*g^3*(4*b*d*f - b*c*g - a*d*g)*x^2*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2]) + 2*b^3*d^3*(b*c - a*d)*g^
4*x^3*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2]) + 6*d^4*(b*f - a*g)^4*Log[a + b*x]*(A + B*Log[(e*(a + b*x)^2)/(
c + d*x)^2]) - 12*B*(b*c - a*d)^2*g^2*(a^2*d^2*g^2 + a*b*d*g*(-4*d*f + c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2
*g^2))*Log[c + d*x] - 6*b^4*(d*f - c*g)^4*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])*Log[c + d*x] + 2*B*(b*c - a
*d)*g^4*(b*d*(b*c - a*d)*x*(2*b*c + 2*a*d - b*d*x) + 2*a^3*d^3*Log[a + b*x] - 2*b^3*c^3*Log[c + d*x]) - 6*B*(b
*c - a*d)*g^3*(-4*b*d*f + b*c*g + a*d*g)*(-(a^2*d^2*Log[a + b*x]) + b*(d*(-(b*c) + a*d)*x + b*c^2*Log[c + d*x]
)) - 6*B*d^4*(b*f - a*g)^4*(Log[a + b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d*(
a + b*x))/(-(b*c) + a*d)]) + 6*b^4*B*(d*f - c*g)^4*((2*Log[(d*(a + b*x))/(-(b*c) + a*d)] - Log[c + d*x])*Log[c
 + d*x] + 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)])))/(3*b^4*d^4))/(4*g)

________________________________________________________________________________________

Maple [F]
time = 0.22, size = 0, normalized size = 0.00 \[\int \left (g x +f \right )^{3} \left (A +B \ln \left (\frac {e \left (b x +a \right )^{2}}{\left (d x +c \right )^{2}}\right )\right )^{2}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^3*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2,x)

[Out]

int((g*x+f)^3*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2,x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 2188 vs. \(2 (858) = 1716\).
time = 0.42, size = 2188, normalized size = 2.52 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^3*(A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2,x, algorithm="maxima")

[Out]

1/4*A^2*g^3*x^4 + A^2*f*g^2*x^3 + 3/2*A^2*f^2*g*x^2 + 2*(x*log(b^2*x^2*e/(d^2*x^2 + 2*c*d*x + c^2) + 2*a*b*x*e
/(d^2*x^2 + 2*c*d*x + c^2) + a^2*e/(d^2*x^2 + 2*c*d*x + c^2)) + 2*a*log(b*x + a)/b - 2*c*log(d*x + c)/d)*A*B*f
^3 + 3*(x^2*log(b^2*x^2*e/(d^2*x^2 + 2*c*d*x + c^2) + 2*a*b*x*e/(d^2*x^2 + 2*c*d*x + c^2) + a^2*e/(d^2*x^2 + 2
*c*d*x + c^2)) - 2*a^2*log(b*x + a)/b^2 + 2*c^2*log(d*x + c)/d^2 - 2*(b*c - a*d)*x/(b*d))*A*B*f^2*g + 2*(x^3*l
og(b^2*x^2*e/(d^2*x^2 + 2*c*d*x + c^2) + 2*a*b*x*e/(d^2*x^2 + 2*c*d*x + c^2) + a^2*e/(d^2*x^2 + 2*c*d*x + c^2)
) + 2*a^3*log(b*x + a)/b^3 - 2*c^3*log(d*x + c)/d^3 - ((b^2*c*d - a*b*d^2)*x^2 - 2*(b^2*c^2 - a^2*d^2)*x)/(b^2
*d^2))*A*B*f*g^2 + 1/6*(3*x^4*log(b^2*x^2*e/(d^2*x^2 + 2*c*d*x + c^2) + 2*a*b*x*e/(d^2*x^2 + 2*c*d*x + c^2) +
a^2*e/(d^2*x^2 + 2*c*d*x + c^2)) - 6*a^4*log(b*x + a)/b^4 + 6*c^4*log(d*x + c)/d^4 - (2*(b^3*c*d^2 - a*b^2*d^3
)*x^3 - 3*(b^3*c^2*d - a^2*b*d^3)*x^2 + 6*(b^3*c^3 - a^3*d^3)*x)/(b^3*d^3))*A*B*g^3 + A^2*f^3*x - 1/3*(6*a^3*c
*d^3*g^3 - 3*(8*c*d^3*f*g^2 - c^2*d^2*g^3)*a^2*b + 2*(18*c*d^3*f^2*g - 6*c^2*d^2*f*g^2 + c^3*d*g^3)*a*b^2 + 2*
(6*c*d^3*f^3 - 27*c^2*d^2*f^2*g + 24*c^3*d*f*g^2 - 7*c^4*g^3)*b^3)*B^2*log(d*x + c)/(b^3*d^4) + 2*(4*a*b^3*d^4
*f^3 - 6*a^2*b^2*d^4*f^2*g + 4*a^3*b*d^4*f*g^2 - a^4*d^4*g^3 - (4*c*d^3*f^3 - 6*c^2*d^2*f^2*g + 4*c^3*d*f*g^2
- c^4*g^3)*b^4)*(log(b*x + a)*log((b*d*x + a*d)/(b*c - a*d) + 1) + dilog(-(b*d*x + a*d)/(b*c - a*d)))*B^2/(b^4
*d^4) + 1/12*(3*B^2*b^4*d^4*g^3*x^4 + 4*(a*b^3*d^4*g^3 + (3*d^4*f*g^2 - c*d^3*g^3)*b^4)*B^2*x^3 - 2*(a^2*b^2*d
^4*g^3 - 4*(3*d^4*f*g^2 - c*d^3*g^3)*a*b^3 - (9*d^4*f^2*g - 12*c*d^3*f*g^2 + 5*c^2*d^2*g^3)*b^4)*B^2*x^2 + 4*(
5*a^2*b^2*c*d^3*g^3 - 2*a^3*b*d^4*g^3 + (18*d^4*f^2*g - 24*c*d^3*f*g^2 + 5*c^2*d^2*g^3)*a*b^3 + (3*d^4*f^3 - 1
8*c*d^3*f^2*g + 24*c^2*d^2*f*g^2 - 8*c^3*d*g^3)*b^4)*B^2*x + 12*(B^2*b^4*d^4*g^3*x^4 + 4*B^2*b^4*d^4*f*g^2*x^3
 + 6*B^2*b^4*d^4*f^2*g*x^2 + 4*B^2*b^4*d^4*f^3*x + (4*a*b^3*d^4*f^3 - 6*a^2*b^2*d^4*f^2*g + 4*a^3*b*d^4*f*g^2
- a^4*d^4*g^3)*B^2)*log(b*x + a)^2 + 12*(B^2*b^4*d^4*g^3*x^4 + 4*B^2*b^4*d^4*f*g^2*x^3 + 6*B^2*b^4*d^4*f^2*g*x
^2 + 4*B^2*b^4*d^4*f^3*x + (4*c*d^3*f^3 - 6*c^2*d^2*f^2*g + 4*c^3*d*f*g^2 - c^4*g^3)*B^2*b^4)*log(d*x + c)^2 +
 4*(3*B^2*b^4*d^4*g^3*x^4 + 2*(a*b^3*d^4*g^3 + (6*d^4*f*g^2 - c*d^3*g^3)*b^4)*B^2*x^3 + 3*(4*a*b^3*d^4*f*g^2 -
 a^2*b^2*d^4*g^3 + (6*d^4*f^2*g - 4*c*d^3*f*g^2 + c^2*d^2*g^3)*b^4)*B^2*x^2 + 6*(6*a*b^3*d^4*f^2*g - 4*a^2*b^2
*d^4*f*g^2 + a^3*b*d^4*g^3 + (2*d^4*f^3 - 6*c*d^3*f^2*g + 4*c^2*d^2*f*g^2 - c^3*d*g^3)*b^4)*B^2*x + (8*a^4*d^4
*g^3 - 2*(12*d^4*f*g^2 + c*d^3*g^3)*a^3*b + 3*(6*d^4*f^2*g + 4*c*d^3*f*g^2 - c^2*d^2*g^3)*a^2*b^2 + 6*(2*d^4*f
^3 - 6*c*d^3*f^2*g + 4*c^2*d^2*f*g^2 - c^3*d*g^3)*a*b^3)*B^2)*log(b*x + a) - 4*(3*B^2*b^4*d^4*g^3*x^4 + 2*(a*b
^3*d^4*g^3 + (6*d^4*f*g^2 - c*d^3*g^3)*b^4)*B^2*x^3 + 3*(4*a*b^3*d^4*f*g^2 - a^2*b^2*d^4*g^3 + (6*d^4*f^2*g -
4*c*d^3*f*g^2 + c^2*d^2*g^3)*b^4)*B^2*x^2 + 6*(6*a*b^3*d^4*f^2*g - 4*a^2*b^2*d^4*f*g^2 + a^3*b*d^4*g^3 + (2*d^
4*f^3 - 6*c*d^3*f^2*g + 4*c^2*d^2*f*g^2 - c^3*d*g^3)*b^4)*B^2*x + 6*(B^2*b^4*d^4*g^3*x^4 + 4*B^2*b^4*d^4*f*g^2
*x^3 + 6*B^2*b^4*d^4*f^2*g*x^2 + 4*B^2*b^4*d^4*f^3*x + (4*a*b^3*d^4*f^3 - 6*a^2*b^2*d^4*f^2*g + 4*a^3*b*d^4*f*
g^2 - a^4*d^4*g^3)*B^2)*log(b*x + a))*log(d*x + c))/(b^4*d^4)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^3*(A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2,x, algorithm="fricas")

[Out]

integral(A^2*g^3*x^3 + 3*A^2*f*g^2*x^2 + 3*A^2*f^2*g*x + A^2*f^3 + (B^2*g^3*x^3 + 3*B^2*f*g^2*x^2 + 3*B^2*f^2*
g*x + B^2*f^3)*log((b^2*x^2 + 2*a*b*x + a^2)*e/(d^2*x^2 + 2*c*d*x + c^2))^2 + 2*(A*B*g^3*x^3 + 3*A*B*f*g^2*x^2
 + 3*A*B*f^2*g*x + A*B*f^3)*log((b^2*x^2 + 2*a*b*x + a^2)*e/(d^2*x^2 + 2*c*d*x + c^2)), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**3*(A+B*ln(e*(b*x+a)**2/(d*x+c)**2))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^3*(A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2,x, algorithm="giac")

[Out]

integrate((g*x + f)^3*(B*log((b*x + a)^2*e/(d*x + c)^2) + A)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (f+g\,x\right )}^3\,{\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f + g*x)^3*(A + B*log((e*(a + b*x)^2)/(c + d*x)^2))^2,x)

[Out]

int((f + g*x)^3*(A + B*log((e*(a + b*x)^2)/(c + d*x)^2))^2, x)

________________________________________________________________________________________